package com.monitoring.infrastructure.persistence;

import com.monitoring.domain.entity.Sensor;
import com.monitoring.domain.repository.SensorRepository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface JpaSensorRepository extends JpaRepository<Sensor, Long>, SensorRepository {
    List<Sensor> findByLocation(String location);
    
    List<Sensor> findByActiveTrue();
    
    default List<Sensor> findActiveSensors() {
        return findByActiveTrue();
    }
    

}